import psutil
import requests
import subprocess


def start_debugmode_browser(edgepath: str = None):
    if edgepath == None:
        # 定义启动命令
        command = r'"C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe" --remote-debugging-port=9652 --disable-extensions www.baidu.com'
    else:
        command = f'"{edgepath}" --remote-debugging-port=9652 --disable-extensions www.baidu.com'
        # ""
    # 启动新的进程
    subprocess.Popen(command, shell=True)
